package com.wtwd.campus.receiver;

import com.wtwd.campus.entity.MqGeneralReply;
import com.wtwd.campus.service.InjectFeignService;

/**
 * @Author: ldaoliang
 * @DateTime: 2022/1/10 15:05
 * @Description:
 */
public class VcomNoticeMessageReceiver implements Receiver{
    @Override
    public String parseMessage(String data) {
        String[] split = data.split(",");
        String imei = split[1];
        String messageType = split[2];
        String commandNumber = split[3];
        String deviceDate = split[4];
        MqGeneralReply mqGeneralReply = new MqGeneralReply();
        mqGeneralReply.setCommandNumber(commandNumber);
        mqGeneralReply.setImei(imei);
        mqGeneralReply.setResult(deviceDate);
        InjectFeignService.getIrmFeignClientService().vcomNoticeMessage(mqGeneralReply);
        return imei;
    }
}
